﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Catalogs.aspx.cs" Inherits="Catalogs" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
  <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="CompanyX">
    </ext:ResourceManager>
        <ext:Viewport ID="Viewport1" Layout="Fit" runat="server"> 
        <Items>
          <ext:GridPanel ID="GridPanel1" 
            runat="server"      
            AnimCollapse="true" 
             
            Width="600"
            Height="450"
            DisableSelection="true">
            <TopBar>
                <ext:Toolbar runat="server">
                    <Items>
                    <ext:ComboBox runat="server" DisplayField="username" ValueField="ID" Editable="False" LabelAlign="Right" FieldLabel="員工" ID="CBUsers">
                        <Store>
                            <ext:Store ID="Store2" runat="server">
                                <Model>
                                    <ext:Model ID="Model2" runat="server">
                                        <Fields>
                                            <ext:ModelField Name="ID"></ext:ModelField>
                                            <ext:ModelField Name="username"></ext:ModelField>
                                        </Fields>
                                    </ext:Model>
                                </Model>
                            </ext:Store>
                        </Store>
                    </ext:ComboBox>
                    <ext:Button runat="server" Icon="User" Text="查询"> 
                        <DirectEvents>
                            <Click OnEvent="Searchs"></Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:ToolbarSeparator runat="server"/>
                     <ext:Button ID="Button1" runat="server" Icon="Group" Text="全部"> 
                        <DirectEvents>
                            <Click OnEvent="SearchAll"></Click>
                        </DirectEvents>
                    </ext:Button>
                    </Items>
                </ext:Toolbar>
            </TopBar>
            <Store>
                <ext:Store ID="Store1" runat="server">
                    <Model>
                        <ext:Model ID="Model1" runat="server" IDProperty="ClassID">
                            <Fields>
                                <ext:ModelField Name="ClassID" />
                                <ext:ModelField Name="ClassName" />
                                <ext:ModelField Name="Total" />
                                <ext:ModelField Name="unUsedTotal" />
                                <ext:ModelField Name="WeiChuLi" />
                                <ext:ModelField Name="WeiJie" />
                                <ext:ModelField Name="BuYao" />
                                <ext:ModelField Name="GenJin" />
                                <ext:ModelField Name="QueShi" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server">               
                <Columns>
                    <ext:Column ID="Column1" runat="server" Text="大类" DataIndex="ClassName" Flex="1" />
                    <ext:Column ID="Column2" runat="server" Text="总计" DataIndex="Total"  />
                    <ext:Column ID="Column3" runat="server" Text="未抽取" DataIndex="unUsedTotal"  />
                    <ext:Column ID="Column4" runat="server" Text="未处理" DataIndex="WeiChuLi"  />
                    <ext:Column ID="Column5" runat="server" Text="未接" DataIndex="WeiJie"  />
                    <ext:Column ID="Column6" runat="server" Text="不要" DataIndex="BuYao"  />
                    <ext:Column ID="Column7" runat="server" Text="跟进" DataIndex="GenJin"  />
                    <ext:Column ID="Column8" runat="server" Text="确实" DataIndex="QueShi"  /> 
                </Columns>
            </ColumnModel>            
            <Plugins>
                <ext:RowExpander ID="RowExpander1" runat="server">
                    <Loader ID="Loader1" runat="server" DirectMethod="#{DirectMethods}.GetGrid" Mode="Component">
                        <LoadMask ShowMask="true" />
                        <Params>
                            <ext:Parameter Name="id" Value="this.record.getId()" Mode="Raw" />
                        </Params>
                    </Loader>
                </ext:RowExpander>
            </Plugins>            
        </ext:GridPanel>
        </Items>
        </ext:Viewport>
    </form>
</body>
</html>
